home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SCRIB4.PAK / PENDLG.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  65 lines

  1. // PenDlg.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "Scribble.h"
  15. #include "PenDlg.h"
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CPenWidthsDlg dialog
  24.  
  25.  
  26. CPenWidthsDlg::CPenWidthsDlg(CWnd* pParent /*=NULL*/)
  27.     : CDialog(CPenWidthsDlg::IDD, pParent)
  28. {
  29.     //{{AFX_DATA_INIT(CPenWidthsDlg)
  30.     m_nThinWidth = 0;
  31.     m_nThickWidth = 0;
  32.     //}}AFX_DATA_INIT
  33. }
  34.  
  35.  
  36. void CPenWidthsDlg::DoDataExchange(CDataExchange* pDX)
  37. {
  38.     CDialog::DoDataExchange(pDX);
  39.     //{{AFX_DATA_MAP(CPenWidthsDlg)
  40.     DDX_Text(pDX, IDC_THIN_PEN_WIDTH, m_nThinWidth);
  41.     DDV_MinMaxInt(pDX, m_nThinWidth, 1, 20);
  42.     DDX_Text(pDX, IDC_THICK_PEN_WIDTH, m_nThickWidth);
  43.     DDV_MinMaxInt(pDX, m_nThickWidth, 1, 20);
  44.     //}}AFX_DATA_MAP
  45. }
  46.  
  47.  
  48. BEGIN_MESSAGE_MAP(CPenWidthsDlg, CDialog)
  49.     //{{AFX_MSG_MAP(CPenWidthsDlg)
  50.     ON_BN_CLICKED(IDC_DEFAULT_PEN_WIDTHS, OnDefaultPenWidths)
  51.     //}}AFX_MSG_MAP
  52. END_MESSAGE_MAP()
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CPenWidthsDlg message handlers
  56.  
  57. void CPenWidthsDlg::OnDefaultPenWidths() 
  58. {
  59.     m_nThinWidth = 2;
  60.     m_nThickWidth = 5;
  61.     UpdateData(FALSE);  // causes DoDataExchange()
  62.         // bSave=FALSE means don't save from screen,
  63.         // rather, write to screen
  64. }
  65.